/**
 * Copyright (c) 2015 www.smarthome.com All rights reserved. <br />
 * 本软件源代码版权归xxxx公司,未经许可不得任意复制与传播.<br />
 *
 */
package com.smarthome.core.deviceManager.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.smarthome.base.service.ShEquipmentDevTalkService;
import com.smarthome.core.deviceManager.EquipmentDevTalkService;
import com.smarthome.domain.bean.ShEquipmentDevTalk;
import com.smarthome.domain.vo.boss.DataGrid;
import com.smarthome.domain.vo.boss.PageHelper;

@Service("equipmentDevTalkService")
public class EquipmentDevTalkServiceImpl implements EquipmentDevTalkService {

	@Resource
	private ShEquipmentDevTalkService shEquipmentDevTalkService;

	@Override
	public DataGrid dataGrid(ShEquipmentDevTalk devTalk, PageHelper page) {
		return shEquipmentDevTalkService.queryDataGrid(devTalk, page);
	}

	@Override
	public void saveOrUpdate(ShEquipmentDevTalk devTalk) {
		shEquipmentDevTalkService.saveOrUpdate(devTalk);
	}

	@Override
	public ShEquipmentDevTalk queryById(Long id) {
		ShEquipmentDevTalk talk = new ShEquipmentDevTalk();
		talk.setId(id);
		return shEquipmentDevTalkService.selectById(talk);
	}

	@Override
	public int delete(Long id) {
		return shEquipmentDevTalkService.deleteByIds(id);
	}

	@Override
	public List<ShEquipmentDevTalk> getAllList(ShEquipmentDevTalk talk) {
		return shEquipmentDevTalkService.selectEntryList(talk);
	}

	@Override
	public List<ShEquipmentDevTalk> getByBuildingIds(Long... buildingIds) {
		return shEquipmentDevTalkService.getByBuildingIds(buildingIds);
	}
}
